var vm = new Vue({
  el: "#shoppingCart",
  delimiters: ['${', '}'],
  data() {
    return Tdata
  },
  methods: {
    clickDel(index){
     if(confirm("确定要删除吗？")) this.shopping_cart_list.splice(index,1)
    },
    clickCheckAll(){
      this.shopping_cart_list.forEach(e=>e.checked=!this.checkAll.length)
      this.checkAll=this.shopping_cart_list.reduce((v,e)=>{return e.checked && v.push(e.id),v },[])
      
    },
    clickEmpty(){
      this.shopping_cart_list=[]
    }
  }

})